<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!-- Menu -->
<jsp:include page="menu.jsp"/>

<div class="sub_nav">
    <ul>
        <li>
            <a href="#">
                <img src="<%= request.getContextPath()%>/images/menu/sub_general_on.gif" alt="gernal"/>
            </a>
        </li>
    </ul>
</div>
<!--END: Subnav -->

<!--START: conent -->
<div class="content2">
    <div class="insider">
        <div class="corners">
            <div class="corners_top"></div>
            <div class="column1">
                <div class="col_l">

                    <!-- Mark the type of the submit action -->
                    <input type="hidden" id="submitAction" name="submitAction"/>

                    <table width="360" border="0" cellspacing="4" class="formlayout_table">
                        <tr>
                            <th width="50%"><label>User ID:</label></th>
                            <td width="50%">
                                ${user.username}
                            </td>
                        </tr>

                        <tr>
                            <th><label>First Name:</label></th>
                            <td>
                                ${user.firstname}
                            </td>
                        </tr>

                        <tr>
                            <th><label>Last Name:</label></th>
                            <td>
                                ${user.lastname}
                            </td>
                        </tr>

                        <tr>
                            <th><label>Email:</label></th>
                            <td>
                                ${user.email}
                            </td>
                        </tr>

                        <tr>
                            <th><label>Group:</label></th>
                            <td>
                                ${user.userGroup.name}
                            </td>
                        </tr>

                        <tr>
                            <th height="10"></th>
                            <td class="bg_n">
                            </td>
                        </tr>

                        <tr>
                            <th><label>Portal User:</label></th>
                            <td>
                                ${permissions['ROLE_PORTAL_USER'] ? 'Yes' : 'No'}
                            </td>
                        </tr>

                        <tr>
                            <th><label>Author:</label></th>
                            <td>
                                ${permissions['ROLE_AUTHOR'] ? 'Yes' : 'No'}
                            </td>
                        </tr>

                        <tr>
                            <th><label>Reviewer:</label></th>
                            <td>
                                ${permissions['ROLE_REVIEWER'] ? 'Yes' : 'No'}
                            </td>
                        </tr>

                        <tr>
                            <th><label>Group Administrator:</label></th>
                            <td>
                                ${permissions['ROLE_GROUP_ADMIN'] ? 'Yes' : 'No'}
                            </td>
                        </tr>

                        <tr>
                            <th><label>System Administrator:</label></th>
                            <td>
                                ${permissions['ROLE_SYS_ADMIN'] ? 'Yes' : 'No'}
                            </td>
                        </tr>
                    </table>
                </div>
                <table width="360" border="0" cellspacing="4" class="formlayout_table fr">
                    <tr>
                        <th width="50%"><label>Account Status:</label></th>
                        <td width="50%">
                            <c:if test="${user.enabled}">Enabled</c:if>
                            <c:if test="${!user.enabled}">Disabled</c:if>
                        </td>
                    </tr>

                    <tr>
                        <th><label>Last Modified Date:</label></th>
                        <td>
                            <fmt:formatDate value="${user.modifiedOn}" pattern="dd-MMM-yyyy"/>
                        </td>
                    </tr>

                    <tr>
                        <th><label>Last Modified By:</label></th>
                        <td>${user.modifiedBy.username}</td>
                    </tr>

                    <tr>
                        <th><label>Disabled By:</label></th>
                        <td>${user.disabledBy}</td>
                    </tr>

                    <tr>
                        <th><label>Disabled Date:</label></th>
                        <td>
                            <fmt:formatDate value="${user.disabledOn}" pattern="dd-MMM-yyyy"/>
                        </td>
                    </tr>

                    <tr>
                        <th><label>Disable Notes:</label></th>
                        <td>${user.disabledNote}</td>
                    </tr>
                </table>
            </div>

            <!-- Function1 -->
            <ul class="functions1">
                <li>
                    <a href="#" onclick="Dialogs.unescapedLink('cancel.html?hasMsg=false', 'from')">
                        <img class="btn"
                             src="<%= request.getContextPath()%>/images/btn/functions1/back_to_results.gif"/>
                    </a>
                </li>
                <c:if test="${user.enabled}">
                    <li>
                        <a href="#" onclick="Dialogs.unescapedLink('edit.html?username=${param.username}', 'from')">
                            <img src="<%= request.getContextPath()%>/images/btn/functions1/btn_edit.gif" class="btn"/>
                        </a>
                    </li>
                </c:if>

                <c:if test="${currentUser != param.username}">
                    <li>
                        <a href="#"
                           onclick="Dialogs.unescapedLink('changestatus.html?username=${user.username}', 'from')">
                            <img src="<%= request.getContextPath()%>/images/btn/functions1/enable_disable_2.gif"
                                 class="btn"/>
                        </a>
                    </li>
                </c:if>
            </ul>

            <div class="corners_bottom"></div>
        </div>

        <div class="message">
            ${message}
            ${empty message ? '' : '<br />'}
        </div>

    </div>
</div>
<!--END: conent -->

<div class="footer"></div>